//
//  SingleProductCellOne.m
//  FlyGift
//
//  Created by lanou3g on 15/7/12.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "SingleProductCellOne.h"


@implementation SingleProductCellOne

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor colorWithWhite:1 alpha:1];
        CGFloat width = self.frame.size.width;
        CGFloat height = self.frame.size.height;
        // 创建图片视图
        self.imageView = [[UIImageView alloc]initWithFrame:CGRectMake(width / 20, 0, width / 10, width / 10)];
        CGPoint ImageCenter = CGPointMake(width / 10, height / 2);
        self.imageView.center = ImageCenter;
        self.imageView.image = [UIImage imageNamed:@"clock"];
        self.imageView.layer.masksToBounds = YES;
        [self.imageView.layer setCornerRadius:self.imageView.bounds.size.height / 2];
        [self.contentView addSubview:_imageView];
        
        // 创建lable
        self.label = [[UILabel alloc]initWithFrame:CGRectMake(width / 5, self.imageView.frame.origin.y, width * 2 / 5, height / 2)];
        self.label.font = [UIFont fontWithName:@"CourierNewPS-ItalicMT" size:height / 3];
        self.label.textColor = [UIColor colorWithRed:0.589 green:0.649 blue:1.000 alpha:1.000];
        self.label.text = @"下次更新";
        [self.contentView addSubview:_label];
        // 时间
        self.timeLable = [[UILabel alloc]initWithFrame:CGRectMake(width * 3 / 5, self.imageView.frame.origin.y, width * 2 / 5, height / 2)];
        self.timeLable.text = @"8:00";
        self.timeLable.font = [UIFont fontWithName:@"CourierNewPS-ItalicMT" size:height / 3];
        self.timeLable.textColor = [UIColor orangeColor];
        [self.contentView addSubview:_timeLable];
    }
    return self;
}

@end
